package com.fwmagic.dp._4;

public class HummerH1Model extends HumanModel {

    //默认要按喇叭
    private boolean isAlarm =true;

    //悍马1由客户决定按不按喇叭
    public void setAlarm(boolean alarm) {
        this.isAlarm = alarm;
    }

    @Override
    protected boolean isAlarm() {
        return this.isAlarm;
    }

    @Override
    protected void start() {
        System.out.println("悍马H1发动");
    }

    @Override
    protected void stop() {
        System.out.println("悍马H1停车");
    }

    @Override
    protected void alarm() {
        System.out.println("悍马H1鸣笛");
    }

    @Override
    protected void engineBoom() {
        System.out.println("悍马H1引擎发动");
    }

}
